Segment Routing (SR) (which can be instantiated for Internet Protocol version 6 (IPv6) or Multiprotocol Label Switching (MPLS)) is a technology based on source routing that enables steering of packets through segments of a SR network and applying services along the path. In SR, a label stack (also commonly referred to as a SR header) is prepended to a packet. A label stack includes labels, which can be topological or service instructions. When the packet reaches a Label Switching Router (LSR), one topological label is popped from the top of the label stack and processed. If there is any service label on top of the topological label, the LSR also pops all those service labels and applies the identified services. The packet and its label stack is then forwarded to the next LSR. The ability to apply services along the transport path and encode all that information in the label stack is one of the unique characteristics of the SR technology.
Operations Administration and Maintenance (OAM) functions are mandatory components in a network architecture. Some of the requirements for OAM in SR are described in I-D.kumar-spring-sr-oam-requirement, which is hereby incorporated by reference. OAM packets must follow the same path as the data packets in the Label Switched Path (LSP). In MPLS, the hash of the label stack is used to determine the next hop (i.e., link) in the case of Equal Cost Multi Path (ECMP) or Link Aggregation (LAG). Thus, in such cases, the service label directly influences the path taken by the packet. For this reason, OAM packets must have the service labels in the label stack in order to follow the same path as the data packets.
When a label stack includes a service label, the packet on the LSP can be processed and modified when the service is applied. However, OAM packets must not be processed by the services as if they are data packets. A conventional network architecture does not provide a mechanism for creating label stacks such that the OAM packet propagates through a SR network using the same path as the data packet, without causing a transit LSR to apply a service on the OAM packet.